package com.cowin.sys.service.impl;

import com.cowin.sys.dao.TmBasPlantMapper;
import com.cowin.sys.model.TmBasPlant;
import com.cowin.sys.model.TmBasWorkshop;
import com.cowin.sys.model.dto.Plant;
import com.cowin.sys.model.vo.ReportPlant;
import com.cowin.sys.service.TmBasPlantService;
import com.cowin.base.AbstractServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


/**
 * Created by  on 2019/11/19.
 * @author CodeGenerator
 */
@Slf4j
@Service
@Transactional(rollbackFor = RuntimeException.class)
public class TmBasPlantServiceImpl extends AbstractServiceImpl<TmBasPlant> implements TmBasPlantService {

    @Resource
    private TmBasPlantMapper tmBasPlantMapper;

    @Override
    public List<TmBasWorkshop> getWorkShopById(Long id) {
        return tmBasPlantMapper.getWorkShopById(id);
    }

    @Override
    public List<Plant> getTreeDetail() {
        return tmBasPlantMapper.getTreeDetail();
    }

    @Override
    public List<ReportPlant> getTreeReportUloc() {
        return tmBasPlantMapper.findTreeReportUloc();
    }
}
